package ms.maplestory.boot.client.character.quest.requirement;

import lombok.Getter;
import ms.maplestory.boot.client.character.Char;
import ms.maplestory.boot.loaders.DatSerializable;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;

@Getter
public class QuestStartMaxLevelRequirement implements QuestStartRequirement {

    private int level;

    public QuestStartMaxLevelRequirement() {

    }

    public QuestStartMaxLevelRequirement(int level) {
        this.level = level;
    }


    @Override
    public boolean hasRequirements(Char chr) {
        return false;
    }

    @Override
    public void write(DataOutputStream dos) throws IOException {
        dos.writeInt(getLevel());
    }

    @Override
    public DatSerializable load(DataInputStream dis) throws IOException {
        return new QuestStartMaxLevelRequirement(dis.readInt());
    }
}
